if exists ( select  *
            from    sys.objects
            where   object_id = object_id(N'[dbo].[twsp_Person_ADD]')
                    and type in ( N'P', N'PC' ) ) 
    drop procedure [dbo].twsp_Person_ADD
go

create procedure twsp_Person_ADD
    @personId int output ,
    @personName varchar(50) ,
    @workCompany varchar(200) ,
    @address varchar(300) ,
    @province varchar(50) ,
    @city varchar(50) ,
    @mobile varchar(15) ,
    @email varchar(50) 
as 
    insert  into [Tb_Person]
            ( [personName] ,
              [workCompany] ,
              [address] ,
              [province] ,
              [city] ,
              [mobile] ,
              [email] ,
              [createTime]
	      )
    values  ( @personName ,
              @workCompany ,
              @address ,
              @province ,
              @city ,
              @mobile ,
              @email ,
              getdate()
	      )
    set @personId = @@IDENTITY

go

